<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>18.主轴的基准尺⼨的定义</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }

    body {
      padding-left: 50px;
      padding-top: 15px;
    }



    article {
      border: solid 5px silver;
      width: 400px;
      height: 500px;
      display: flex;
      flex-direction: column;
    }

    /*
 flex-basis 属性定义了在分配多余空间之前，项目占据的主轴空间（main size）。浏览器根据这个属性，计算主轴是否有多余空间。

 可以是长度单位，也可以是百分比。flex-basis的优先级高于width、height属性。min-height,max-width等属性高于flex basis
*/
    article div {
      flex-basis: 100px;
      max-height: 50px;
      width: 100px;
      border: solid 1px blueviolet;
      padding: 10px;
      background-clip: content-box;
      -webkit-background-clip: content-box;
      box-sizing: border-box;
      background-color: rgba(255, 0, 0, 0.5);
      font-size: 35px;
      color: white;
    }
  </style>
</head>

<body>
  <article>
    <div>1</div>
    <div>2</div>
    <div>3</div>
  </article>
</body>

</html>